<?php
namespace App\Services\User;

use App\Service\User\UsersService;
use App\Services\Games\GamesService;

class RegisterService{
    public  static function register($data){
        //验证数据
        self::_verifyRegisterData($data);
        //处理基本数据
        self::_handleRegisterData($data);
        
        
        //保存基本数据
        UsersService::create($data);
        //生成测试结果
        GamesService::generateResult($data);
        //如果有邀请码则主动发送添加好友请求给邀请用户并发送通知
        //返回结果
        return [];
    }
    private static function _verifyRegisterData(&$data){
        
    }
    private static function _handleRegisterData(&$data){
        //处理基本数据
    }
    
}